package com.homework.vehicle.Auto;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/3/26 19:21
 * @description
 */
public class Tank extends AutoMobile{
    private String tank;

    public Tank() {
    }

    public Tank(String type, String tank) {
        super(type);
        this.tank = tank;
    }

    public String getTank() {
        return tank;
    }

    public void setTank(String tank) {
        this.tank = tank;
    }

    @Override
    public void getInfo(){
        System.out.print(getType()+tank);
    }
    @Override
    public void atk() {
        System.out.println("可以攻击");
    }

    @Override
    public String toString() {
        return "Tank{" +
                "tank='" + tank + '\'' +
                '}';
    }
}
